import { createSlice } from "@reduxjs/toolkit";
let initialState = {
  articles: [],
  errors: null,
  count: 0,
  currentPage: 1,
  tag: "",
  tags: [],
};

export const articlesSlice = createSlice({
  name: "articles",
  initialState,
  reducers: {
    articlesAuthorResult: (state, action) => {
      state.articles = action.payload.articles;
      state.count = action.payload.count;
    },
  },
});

export const { articlesAuthorResult } = articlesSlice.actions;

export default articlesSlice.reducer;
